#[cfg(feature = "tokio")]
#[tokio::main]
async fn main() {
  #[cfg(feature = "cmd")]
  #[cfg(feature = "tokio")]
  {
    use e_utils::cmd::{a_shell_open, Cmd};

    async fn test_cmd() {
      let output = Cmd::new("echo Hello from cmd").a_output().await.unwrap();
      assert_eq!(output.stdout, "Hello from cmd");
      assert!(Cmd::new("echo Hello from cmd").output().is_err());
    }

    async fn test_shell_open_windows() {
      assert!(a_shell_open("C:\\").await.is_ok());
    }
    test_cmd().await;
    test_shell_open_windows().await;
  }
}

#[cfg(not(feature = "tokio"))]
fn main() {
  println!("tokio feature is not enabled");
}

